package com.gugee.tiktok.web.repository;

import com.gugee.tiktok.web.model.mysql.TAwemeRecord;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface TAwemeRecordRepository extends CrudRepository<TAwemeRecord,Long> {


    @Query("select * from t_aweme_record " +
            "where aweme_id = :awemeId " +
            "and FROM_UNIXTIME(record_date,'%H') % :hourInterval=0 " +
            "order by record_date")
    List<TAwemeRecord> findByAwemeId(long awemeId, int hourInterval);
}
